
document.getElementById('addBtn').onclick = function(){
   location.href = '/add'
}
function confirmDelete(id,img){

  let result = layer.confirm('你真的要永久删除它吗，数据不可恢复', {
       btn: ['yes', 'no'], 
       shadeClose: true,
       //第一个透明度,第二个是背景颜色
       shade: [0.5, '#ccc']
   },()=>{
       //确认触发
       location.href="/delete?id="+id+"&img"+img;
   },()=>{
       //  layer.msg("编辑失败",{icon:2});
       layer.msg('取消删除')
   });

  
}